import React from 'react';
import PropTypes from 'prop-types';
import { Modal } from 'ywen-mobile-ui';
import BaseComponent from '../../components/common/baseComponent.js';
import tel_tips from '../../../assets/images/escort/telmodal/tel_tips.png';
import btn_close from '../../../assets/images/escort/telmodal/btn_close.png'

class TelModal extends BaseComponent {
    static propTypes = {
        clickFunc: PropTypes.func,
    }

  state = {
    show:false
  }

  show = ()=> {
    this.setState({ show: true});
  }

  close = () => {
    const { clickFunc } = this.props;
    this.setState({ show: false });
    clickFunc();
  }

  render() {
    const { show } = this.state;

    if (!show) {
      return null;
    }
    return (
      <Modal className="coupon-rule-modal">
        <div className="tel-content">
          <img src={tel_tips} alt="" className="tel-tips" />
          <div className='tel-line'  onClick={this.close}></div>
          <img src={btn_close} alt='' className='btn-close'  onClick={this.close}></img>

        </div>
      </Modal>
    );
  }
}

export default TelModal;

